Inside Macintosh: QuickTime Components

| Previous | Chapter contents | Chapter top | Section top | Next |

Creating a Movie Data Exchange Component

This section discusses the details of creating a movie data exchange component. This section includes source code for two simple movie data exchange components.

You should consider creating a movie data import component if you have data that you would like to place in a QuickTime movie and there are not currently facilities for placing that type of data into a movie. Similarly, if you want to work with data from a QuickTime movie without using QuickTime, you might consider creating a movie data export component that can convert the data into a format your program can understand.

After reading this section, you should understand all of the special requirements of these components. The functional interface that your component must support is described in "Movie Data Exchange Components Reference" . Note that a single component may support only import or export functions, not both.

Before reading this section, you should be familiar with how to create components. See the chapter "Component Manager" in Inside Macintosh: More Macintosh Toolbox for a complete discussion of components, how to use them, and how to create them.

Apple has defined component type values for movie data exchange components. You can use the following constants to specify this component type:

#define MovieImportType 'eat '                  /* movie data import */
#define MovieExportType 'spit'                  /* movie data export */

Apple has defined a functional interface for movie data exchange components. For information about the functions that your component must support, see "Movie Data Exchange Components Reference" . You can use the following constants to refer to the request codes for each of the functions that your component must support:

enum {
    /* movie data import components */
    kMovieImportHandleSelect                        = 1,    /* import from handle */
    kMovieImportFileSelect                          = 2,    /* import from file */
    kMovieImportSetSampleDurationSelect             = 3,    /* set sample duration */
    kMovieImportSetSampleDescriptionSelect
                                                    = 4,    /* set sample description */
    kMovieImportSetMediaFileSelect                  = 5,    /* set media file */
    kMovieImportSetDimensionsSelect                 = 6,    /* set track dimensions */
    kMovieImportSetChunkSizeSelect                  = 7,    /* set chunk size */
    kMovieImportSetProgressProcSelect               = 8,    /* set progress function */
    kMovieImportSetAuxiliaryDataSelect              = 9,    /* set additional data */
    kMovieImportSetFromScrapSelect                  = 10,   /* data from scrap */
    kMovieImportDoUserDialogSelect                  = 11,   /* invoke user dialog box */
    kMovieImportSetDurationSelect                   = 12    /* set paste duration */

    /* movie data export components */
    kMovieExportToHandleSelect                      = 128,  /* export to handle */
    kMovieExportToFileSelect                        = 129,  /* export to file */
    kMovieExportDoUserDialogSelect                  = 130,  /* invoke user dialog box */
    kMovieExportGetAuxiliaryDataSelect              = 131,/* get additional data */
    kMovieExportSetProgressProcSelect `             = 132   /* set progress function */
};

A Sample Movie Import Component

A Sample Movie Export Component


© 1997 Apple Computer, Inc.

| Previous | Chapter contents | Chapter top | Section top | Next |